/*
 * Created on Feb 17, 2005
 */
package com.scalar.chiptrack.finance.openpo.forms;

import java.util.Calendar;
import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * @author Ravikanth
**/
public class PurchaseOrderSearchForm extends ActionForm
{
	private String poNumber;
	private String year = Integer.toString ( Calendar.getInstance ().get ( Calendar.YEAR ) );
	private String validFromDate;
	private String validToDate;
	private String status;
	private int vendor_id;
	private int processStep_Id;
	private int poType; 
	private boolean showExpired;
    private String action;
    private ArrayList purchaseOrderSearchList;

	/**
	 * @return
	 */
	public String getYear()
	{
		return year;
	}

	/**
	 * @return
	 */
	public String getPoNumber()
	{
		return poNumber;
	}

	/**
	 * @return
	 */
	public String getValidFromDate()
	{
		return validFromDate;
	}

	/**
	 * @return
	 */
	public String getValidToDate()
	{
		return validToDate;
	}

	/**
	 * @return
	 */
	public int getVendor_id()
	{
		return vendor_id;
	}

	/**
	 * @param string
	 */
	public void setYear(String string)
	{
		year = string;
	}

	/**
	 * @param string
	 */
	public void setPoNumber(String string)
	{
		poNumber = string;
	}

	/**
	 * @param string
	 */
	public void setValidFromDate(String string)
	{
		validFromDate = string;
	}

	/**
	 * @param string
	 */
	public void setValidToDate(String string)
	{
		validToDate = string;
	}

	/**
	 * @param i
	 */
	public void setVendor_id(int i)
	{
		vendor_id = i;
	}

	/**
	 * @return
	 */
	public boolean isShowExpired()
	{
		return showExpired;
	}

	/**
	 * @param b
	 */
	public void setShowExpired(boolean b)
	{
		showExpired = b;
	}

    public ArrayList getPurchaseOrderSearchList() {
        return purchaseOrderSearchList;
    }

    public void setPurchaseOrderSearchList(ArrayList purchaseOrderSearchList) {
        this.purchaseOrderSearchList = purchaseOrderSearchList;
    }

	/**
	 * For resetting the PurchaseOrderSearchForm Values
	 * @param mapping
	 * @param request
	 */
	public void reset( ActionMapping mapping, HttpServletRequest request )
	{
		year = Integer.toString ( Calendar.getInstance ().get ( Calendar.YEAR ) );
		poNumber = "";
		vendor_id = -1;
		poType = -1;
		status = "-1";
		processStep_Id = -1;
	}
	/**
	 * @return
	 */
	public int getPoType()
	{
		return poType;
	}

	/**
	 * @return
	 */
	public int getProcessStep_Id()
	{
		return processStep_Id;
	}

	/**
	 * @param i
	 */
	public void setPoType(int i)
	{
		poType = i;
	}

	/**
	 * @param i
	 */
	public void setProcessStep_Id(int i)
	{
		processStep_Id = i;
	}

	/**
	 * @return
	 */
	public String getStatus()
	{
		return status;
	}

	/**
	 * @param string
	 */
	public void setStatus(String string)
	{
		status = string;
	}
    /**
     * @return
     */
    public String getAction()
    {
        return action;
    }

    /**
     * @param string
     */
    public void setAction(String string)
    {
        action = string;
    }

}
